package com.ruoyi.web.core.config;

import com.github.wxpay.sdk.WXPayConfig;
import lombok.extern.slf4j.Slf4j;

import java.io.IOException;

/**
 * 天蛙小程序  哈啰商户号收款配置
 */
@Slf4j
public class HelloConfig extends WechatConfig{

    /**
     * 天蛙小程序appId
     */
    public static final String APPID = "wxd602e0793295cc28";

    /**
     * 天蛙小程序密钥
     */
    public static final String SECRET = "7ec0b59e73b75b7388bd0323f1d29955";

    /**
     * 哈啰商户号
     */
    public static final String MCHID = "1602299358";

    /**
     * 哈啰商户密钥 --- 同 API V3 密钥
     */
    public static final String KEY = "6c2a8cf7bede05a0c614970b632dd7cd";

    /**
     * 哈啰API V3 秘钥
     */
    public static final String API_V3_KEY = "9af7be028a0d36f55cce422d57b60f0b";


    public static final String BODY = "智能物联";

    public static final  String DESC = "智能物联分润到账";

    /**
     * 哈啰支付分充电宝服务号
     */
    public static final String SERVICE_ID = "00002000000000160586036766146527";

    /**
     * 支付分签名方式
     */
    public static final String SIGN_TYPE = "HMAC-SHA256";

    /**
     * 金额环回说明
     */
    public static final String REFUND_DESC = "智能物联，余额退还";

    /**
     * 哈啰商户api证书序列号
     * https://myssl.com/cert_decode.html 证书解析地址
     */
    public static final String SERIAL_NO = "53D340926EA38269F549722ED35ABF4B749C9ECB";

    /**
     * 哈啰证书内容  apiclient_key.pem文件中的内容 除去开头结尾行
     *  请求量大为节约资源直接拿出来
     */
    public static final String PRIVATE_CONTENT = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDgAIDzGluDYwaK" +
            "/I/RrpooREJJjSmOcZ8ulI5UEtfZxN8r9ygTRMy7R+USoQ8mKJFtMtHaeXnpkoaC" +
            "epgMe023rKYrc1ot74m5RW5Zur+292AtXxlOo+0uj6mqFwN9dG4IzKyTcdZKEsef" +
            "087/6srThhhSL1Wm4ZVSyLra6y0AycvYT2y2RzYbBeGnMmNGeF20jTZJ8Y7oo/iH" +
            "zjg7j2k9M53fDRNf/3BUqp0hwYBauH8gHTULGCVmcs5QgZl4WKkpjXkf5f7dCF3k" +
            "aCxZuLOkrcRD70tGBX5Nmzo3ZRfa2Xv7+37irrgnZJ5moqYZ96oaBiY04Z96bDtx" +
            "7Z/t6AFBAgMBAAECggEBAMOOzQTvittOlYS7b9eQRldHGFPcIF6SRXVGDmfJt5YP" +
            "8QISGXORCeeqoYs8/tvCaQvbZSgGC2/mEvZQjvO+ph/nY37liuI1kJglzGwbxIm4" +
            "t8eEkbR9GnEezPGIe+yHvBSEk1l59anfcVXQdZQo5//4vrzpRC6YHGQUiETdMgHP" +
            "iEMBRI6ZkargW3SNePobFRGAwHd6gnJfnkNFeWqPAkfoRo3e8W+AV9ujrCXJwA/y" +
            "gUpnpidGB8VxofGLwVX0qHSe8n65B2hL6ZPKm1IpIz56dhBlHI+LtO6u07EDjVu1" +
            "h4rRuna8NIVwOkyvrlaI19O7JRjs4ADG8TL0lIR3HAECgYEA+zrEM3MuomK8qtWL" +
            "Ss0BtO5ymHoR05pN9/K179BaZsNYfRMp4bGX6uknc2iC2ionnrjSg9AMltv12AU7" +
            "rwfaoTqhaaSp1+x4vS9ZYRK1Dp5jKov/40DeuOl1XuWoWv40uxC4spLdndnS5xZh" +
            "yqYp7t/Ov1z79/NFzIrbtdBJbqECgYEA5EFiHYRpegD3nSlD61Nfgz6t+ZEF2VfE" +
            "gKJk0EcfvmmckM+oOag0NAbxyIeaLVtTI28j2jmZXwRKpXI5Q0m0RY6p4Txog8SB" +
            "UcESEsBxDLXe6MtaY2UqVJvlF+FeCC6UEU7fSGR1XlLdDUi3+AUm8Z6ZPj4mSWcO" +
            "THWjIKGIrqECgYBkgQwAsTGU0P89MJS65eyq30GE8kCzcGWErdpPCAFCXx/FWadF" +
            "nPBzj7aymrrOYFLdUn8VMGP47iIZu243BWNXYMc2JiO0N+vNc2XESeGY6ZAuczd5" +
            "SHhRbUQBJMsHK+8YbwYUmmCCR6Pxwqh4k6Tu5SYmtCIw/WeM/ngK8jqOQQKBgF6n" +
            "QnGtHDRMvGH+37xxeXUqg+ivG/bSL5mMPjQkmmRS1WszwbYPK367tn4KxYOzkFls" +
            "WDjBk/lUBURwhpCBuvDxRT8y1sB1t47Yeo8uIHM95C8zTMtVA2XMtAbgHSdVcW9v" +
            "/qW9ivJPeH1uv2Npd4nQ1Al8qlHcG5DXY4s/kTehAoGBAMKxq30Lz8ubvGaPt2vt" +
            "8Ou7EXPuvRRII3EKGz1MOdn7ck5uou5Jl6wz/RQrakd9+jbZauZNIxGo+UPT55Wz" +
            "UwN/PP23LWtoicnVl4y6Ivy+6/2V6doGc0CLhY3Jh41SgA80H+jWZV3If4sFX7/E" +
            "ZTEmdcXDE3F+JulLTQFZVb6r";

    @Override
    public String getAppid() {
        return APPID;
    }

    @Override
    public String getSecret() {
        return SECRET;
    }

    @Override
    public String getMchId() {
        return MCHID;
    }

    @Override
    public String getKey() {
        return KEY;
    }

    @Override
    public String getApiV3Key() {
        return API_V3_KEY;
    }

    @Override
    public String getBody() {
        return BODY;
    }

    @Override
    public String getDesc() {
        return DESC;
    }

    @Override
    public String getServiceId() {
        return SERVICE_ID;
    }

    @Override
    public String getSignType() {
        return SIGN_TYPE;
    }

    @Override
    public String getRefundDesc() {
        return REFUND_DESC;
    }

    @Override
    public String getSerialNo() {
        return SERIAL_NO;
    }

    @Override
    public String getPrivateContent() {
        return PRIVATE_CONTENT;
    }

    @Override
    public WXPayConfig getWXPayConfig() {
        try {
            return new HelloPayConfig();
        } catch (IOException e) {
            log.error("【error】：哈啰商户配置文件初始化失败" +e.getMessage(), e);
        }
        return null;
    }
}
